import java.util.*;

public class Fibonacci{
	public static void main(String[] args){
		System.out.println("Please input the lengh of Fibonacci printed:");
		Scanner console=new Scanner(System.in);
		int a=0,b=1,c,i,j;
		i=console.nextInt();
		for(j=0;j<i;j++){
			System.out.printf("%d ",b);
			if((i+1)%10==0){
				System.out.println();}
			c=b;
			b=a+b;
			a=c;
		
		}
	}
}
